﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Convertor.Interface;

namespace Convertor
{
    /// <summary>
    /// 插件列表集合
    /// </summary>
    [Serializable]
    public class PluginsItemCollection : IPluginsItemCollection
    {
        private readonly ObservableCollection<IPluginItem> selectedPlugins = new ObservableCollection<IPluginItem>();
        /// <summary>
        /// 
        /// </summary>
        public ObservableCollection<IPluginItem> SelectedPlugins
        {
            get { return selectedPlugins; }
        }
        /// <summary>
        /// 
        /// </summary>
        public PluginsItemCollection()
        {
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="selectedPlugins"></param>
        public void Set(ObservableCollection<IPluginItem> selectedPlugins)
        {
            this.selectedPlugins.Clear();
            foreach (var item in selectedPlugins)
            {
                this.selectedPlugins.Add(item);
            }
        }
    }
}
